﻿Public Class ven_eng_rec4

    Private Sub btnok_ven_eng_rec4_Click(sender As Object, e As EventArgs) Handles btnok_ven_eng_rec4.Click
        yc4 = Convert.ToSingle(txtyc4_eng_rec4.Text)
        pc4 = Convert.ToSingle(txtpc4_eng_rec4.Text)
        angpresn4 = Convert.ToSingle(txtangpresn4_eng_rec4.Text)
        angpresn4 = angpresn4 * (3.141592 / 180)
        angheli4 = 0
        angheli4 = angheli4 * (3.141592 / 180)
        mod4 = Convert.ToSingle(txtmod4_eng_rec4.Text)
        z4 = Convert.ToSingle(txtz4_eng_rec4.Text)
        mt4 = (pc4 * 10 ^ 6) / nrev
        dp4 = (mod4 * z4) / Math.Cos(angheli4)
        c4x = (2 * mt4) / dp4
        c4y = c4x * Math.Tan(angheli4)
        c4z = c4x * (Math.Tan(angpresn4) / Math.Cos(angheli4))
        m4x = -dp4 * 0.5 * c4y
        m4y = dp4 * 0.5 * c4x
        m4z = 0

        Me.Close()
    End Sub
End Class